package com.newsanalysis.service;

import com.newsanalysis.model.entity.User;
import org.springframework.security.core.userdetails.UserDetailsService;

import java.util.List;
import java.util.Optional;

public interface UserService extends UserDetailsService {
    
    User save(User user);
    
    boolean register(User user);
    
    Optional<User> findByUsername(String username);
    
    Optional<User> findById(Long id);
    
    List<User> findAll();
    
    boolean updateUser(User user);
    
    boolean deleteById(Long id);
    
    boolean existsByUsername(String username);
    
    boolean existsByEmail(String email);
}

